/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.csvgenerator.engine.vg;

import java.util.Random;

/**
 *
 * @author Administrator
 */
public class RandomValueGenerator extends NumberValueGenerator {

    private long lowerBound = new Long(0);
    private long upperBound = Long.MAX_VALUE;
    private long mod = new Long(1);
    private float gravity = new Long(1);
    private String prefix = "";
    private String suffix = "";

    public RandomValueGenerator() {
    }

    @Override
    public String nextValue() {
        String nextValue = prefix + ((long) ((upperBound - lowerBound) * new Random().nextFloat() * gravity + lowerBound)) + suffix;
        currentValue = nextValue;
        return nextValue;
    }

    /**
     * @return the lowerBound
     */
    public long getLowerBound() {
        return lowerBound;
    }

    /**
     * @param lowerBound the lowerBound to set
     */
    public void setLowerBound(long lowerBound) {
        this.lowerBound = lowerBound;
    }

    /**
     * @return the upperBound
     */
    public long getUpperBound() {
        return upperBound;
    }

    /**
     * @param upperBound the upperBound to set
     */
    public void setUpperBound(long upperBound) {
        this.upperBound = upperBound;
    }

    /**
     * @return the mod
     */
    public long getMod() {
        return mod;
    }

    /**
     * @param mod the mod to set
     */
    public void setMod(long mod) {
        this.mod = mod;
    }

    /**
     * @return the gravity
     */
    public float getGravity() {
        return gravity;
    }

    /**
     * @param gravity the gravity to set
     */
    public void setGravity(float gravity) {
        this.gravity = gravity;
    }

    /**
     * @return the prexif
     */
    public String getPrefix() {
        return prefix;
    }

    /**
     * @param prexif the prexif to set
     */
    public void setPrefix(String prefix) {
        this.prefix = prefix;
    }

    /**
     * @return the suffix
     */
    public String getSuffix() {
        return suffix;
    }

    /**
     * @param suffix the suffix to set
     */
    public void setSuffix(String suffix) {
        this.suffix = suffix;
    }
}
